//
//  NBDetailViewController.swift
//  NBSinaWeibo
//
//  Created by ac on 16/5/19.
//  Copyright © 2016年 ac. All rights reserved.
//

import UIKit

class NBDetailViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        
        self.title = "\(navigationController!.childViewControllers.count ?? 0)"

        view.backgroundColor = UIColor.whiteColor()
//        self.navigationItem.leftBarButtonItem = UIBarButtonItem(imageName: "navigationbar_back_withtext", title: "返回", target: self, action: #selector(popVC))
        
        self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: "next", style: .Plain, target: self, action: #selector(next))
        
    }
    
    @objc private func next(){
        
        let vc = NBDetailViewController()
        self.navigationController?.pushViewController(vc, animated: true)
    }
    
//    @objc private func popVC(){
//        self.navigationController?.popViewControllerAnimated(true)
//    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
